`
https://leetcode.cn/problems/sum-of-square-numbers/
`

/**
 * @param {number} c
 * @return {boolean}
 */
var judgeSquareSum = function (c) {
  let a = 0, b = Math.floor(Math.sqrt(c))
  while (a <= b) {
    s = a * a + b * b
    if (s === c) return true
    if (s < c) a++
    else b--
  }
  return false
};